package com.jxc.service.impl;

import com.jxc.mapper.SaleListGoodsMapper;
import com.jxc.service.SaleListGoodsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SaleListGoodsServiceImpl implements SaleListGoodsService{

    @Resource
    private SaleListGoodsMapper saleListGoodsMapper;
    @Override
    public Integer getTotalByGoodsId(Integer goodsId) {
       return saleListGoodsMapper.sumSaleTotal(goodsId)==null?0:saleListGoodsMapper.sumSaleTotal(goodsId);
    }
}
